{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "# 查阅码本匹配权重"
   ],
   "metadata": {
    "collapsed": false
   },
   "id": "9e95d3da38e02059"
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Parameter containing:\n",
      "tensor([0., 0., 0.,  ..., 0., 0., 0.], dtype=torch.float64)\n"
     ]
    }
   ],
   "source": [
    "from torch import nn\n",
    "import torch\n",
    "\n",
    "weight = nn.Parameter(torch.load('pretrained_models/weight_for_matching_dehazing_Flickr.pth'), requires_grad=False)\n",
    "print(weight)"
   ],
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "end_time": "2023-12-24T13:30:30.837747100Z",
     "start_time": "2023-12-24T13:30:29.703713200Z"
    }
   },
   "id": "initial_id"
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "-2.710505431213761e-20"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "torch.load('pretrained_models/weight_for_matching_dehazing_Flickr.pth').numpy().mean()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "end_time": "2023-12-24T13:30:41.015554300Z",
     "start_time": "2023-12-24T13:30:41.007501Z"
    }
   },
   "id": "f0f5034a23829da4"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
